package com.office.onlineInformation.unread.dao;

import com.office.onlineInformation.unread.pojo.OaOnlineMessage;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 88168
 * @since 2022-10-25
 */
@Mapper
public interface UnreadMapper extends BaseMapper<OaOnlineMessage> {
    /**
     * 查询草稿箱留言
     * @param message
     * @return
     */
    List<OaOnlineMessage> getList(@Param("pojo")OaOnlineMessage message);

    /**
     * 根据id查询留言
     * @param informationId
     * @return
     */
   OaOnlineMessage getById(@Param("id") int informationId);

    /**
     * 修改未读的
     * @param onlineMessage
     * @return
     */
    int updateUnRead(@Param("pojo") OaOnlineMessage onlineMessage);

    /**
     * 删除未读的留言
     * @param informationId
     * @return
     */
    int updateDeleted(@Param("id")int informationId);
}
